//
//  BaseItemTableViewController.m
//  MobileChecker
//
//  Created by Lymons on 15-1-13.
//  Copyright (c) 2015年 Lymons. All rights reserved.
//

#import "BaseItemTableViewController.h"

@interface BaseItemTableViewController ()

@end

@implementation BaseItemTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self bindViewModel];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)bindViewModel
{
    self.viewModel.tableViewCellIdentifier = self.tableViewCellIdentifier;
    self.tableView.dataSource = self.viewModel;
}

#pragma -
#pragma mark - UITableViewDelegate

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    if ([[self.viewModel.items objectAtIndex:indexPath.row] isEqualToString:ITEM_RESULT_NONE]) {
        return 1;
    }
    return 28;
}

@end
